package com.app.lcl.model;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Session;
import org.hibernate.Transaction;

import com.app.lcl.entities.Student;
import com.app.lcl.utils.HibernateUtil;

public class StudentManager {
	private void createAndStoreStudent(){
		Session sess = HibernateUtil.currentSession();
		Transaction tx=sess.beginTransaction();
		Student stu = new Student();
		/*stu.setAge(23);
		stu.setStuNo("151307040017");
		stu.setStuName("李成龙");*/
		List<String> books = new ArrayList<String>();
		books.add("java");
		books.add("Machine Learning");
		books.add("高等数学");
		sess.save(stu);
		tx.commit();
		HibernateUtil.closeSession();
	}
}
